
import React, { memo, useState } from 'react'

const TestCpn = memo((props) => {
  const [num,setNum] = useState(0)
  function clickSonFun(){
    props.onF()
    setNum(num+1)
  }
  console.log('TestCpn--render')
  return (
    <div>
      TestCpn:{props.title}
      <h6>num:{num}</h6>
      <button onClick={clickSonFun}>clickSon</button>
    </div>
  )
})

export default TestCpn